home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / listx / quickadd.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-11-12  |  2.7 KB  |  81 lines

  1. VERSION 5.00
  2. Object = "{9FE255D1-F32E-11D0-9E15-444553540000}#1.0#0"; "MLISTX.OCX"
  3. Begin VB.Form Form1 
  4.    Caption         =   "List/X+ PutItems Sample"
  5.    ClientHeight    =   3510
  6.    ClientLeft      =   3090
  7.    ClientTop       =   2430
  8.    ClientWidth     =   4245
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   3510
  11.    ScaleWidth      =   4245
  12.    Begin MabryCtl.MList MList1 
  13.       Height          =   3015
  14.       Left            =   240
  15.       TabIndex        =   0
  16.       Top             =   240
  17.       Width           =   1935
  18.       _ExtentX        =   3413
  19.       _ExtentY        =   5318
  20.       Object.TabStop         =   -1  'True
  21.       MousePointer    =   -1163005939
  22.       ColRowOrder     =   -1  'True
  23.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  24.          Name            =   "MS Sans Serif"
  25.          Size            =   8.25
  26.          Charset         =   0
  27.          Weight          =   400
  28.          Underline       =   0   'False
  29.          Italic          =   0   'False
  30.          Strikethrough   =   0   'False
  31.       EndProperty
  32.       BeginProperty Columns {23BAA6DE-05A6-11D1-9E15-0020AFD6A9D5} 
  33.          ColumnCount     =   1
  34.          BeginProperty Column0 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5} 
  35.             Object.Width           =   0
  36.             MinWidth        =   0
  37.             MaxWidth        =   -1
  38.             UserResizeEnabled=   -1
  39.             Heading         =   ""
  40.             Object.Visible         =   -1
  41.             ColumnAlignment =   0
  42.             HeadingAlignment=   0
  43.          EndProperty
  44.       EndProperty
  45.    End
  46.    Begin VB.Label Label2 
  47.       Caption         =   "Look in the Form_Load procedure to see how it's done."
  48.       Height          =   1215
  49.       Left            =   2280
  50.       TabIndex        =   2
  51.       Top             =   1200
  52.       Width           =   1695
  53.    End
  54.    Begin VB.Label Label1 
  55.       Caption         =   "This sample shows how to use the PutItems method to quickly add items to a list."
  56.       Height          =   855
  57.       Left            =   2280
  58.       TabIndex        =   1
  59.       Top             =   240
  60.       Width           =   1695
  61.    End
  62. Attribute VB_Name = "Form1"
  63. Attribute VB_GlobalNameSpace = False
  64. Attribute VB_Creatable = False
  65. Attribute VB_PredeclaredId = True
  66. Attribute VB_Exposed = False
  67. Option Explicit
  68. Private Sub Form_Load()
  69.    Dim i As Long
  70.    Dim items(1000) As String
  71.    Me.Left = (Screen.Width - Me.ScaleWidth) / 2
  72.    Me.Top = (Screen.Height - Me.ScaleHeight) * 2 / 5
  73.    Me.Show
  74.    ' fill array with items
  75.    For i = LBound(items) To UBound(items)
  76.       items(i) = i
  77.    Next
  78.    ' put all items in list at once
  79.    MList1.PutItems items
  80. End Sub
  81.